package com.example.demo.design.template;

public interface Process {

    /**
     * Execution.
     * 执行业务
     */
    default void execution(){
        System.out.println(Thread.currentThread().getName() + "<==>");
        enter();
        getTicket();
        lineUp();
        handleBusiness();
        appraise();
        leave();
    };

    /**
     * Enter.
     * 进入银行
     */
    default void enter(){
        System.out.println("进入银行！");
    };

    /**
     * Gets ticket.
     * 取票
     */
    void getTicket();

    /**
     * Line up.
     * 排队
     */
    void lineUp();

    /**
     * Handle business.
     * 办理业务
     */
    void handleBusiness();

    /**
     * Appraise.
     * 评价
     */
    void appraise();

    /**
     * Leave.
     * 离开
     */
    default void leave(){
        System.out.println("离开银行！");
    };

}
